<?php
/* @var $this UserController */
/* @var $model User */
/* @var $form CActiveForm */
?>

<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/seajs/sea-debug.js"></script>
<script type="text/javascript">
    define('init1', function (require) {
        require('mod1');

        $ && $(function () {
            console.log('reg is loaded');
        })
    });
    seajs.use('init1');
</script>

<div class="form">

    <?php $form = $this->beginWidget('CActiveForm', array(
    'id' => 'user-register-form',
    'enableAjaxValidation' => true,
)); ?>

    <p class="note">同学们请注意: 标有 <span class="required">*</span> 的项是必填的!</p>

    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model, 'name'); ?>
        <?php echo $form->textField($model, 'name'); ?>
        <?php echo $form->error($model, 'name'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'email'); ?>
        <?php echo $form->textField($model, 'email'); ?>
        <?php echo $form->error($model, 'email'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'nick'); ?>
        <?php echo $form->textField($model, 'nick'); ?>
        <?php echo $form->error($model, 'nick'); ?>
    </div>

    <div class="row buttons">
        <?php $this->widget('bootstrap.widgets.TbButton', array(
        'buttonType' => 'button',
        'type' => 'primary',
        'label' => 'Click me',
        'loadingText' => 'loading...',
        'htmlOptions' => array('id' => 'buttonStateful'),
    )); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->